The invention relates to electronic devices, and, more particularly, to real-time control and circuitry and methods.
Automatic motor control generally includes sensing the current state of the motor (e.g., shaft position or shaft velocity) plus a feedback of the difference between the sensed state and the desired state to control the motor input. Many digital motor control systems using digital signal processors (DSPs) require the acquisition of information from a feedback digital transducer. The information from a transducer such as an encoder is in the form of a digital pulse stream and represents the position of the mechanism under control. The frequency of this pulse stream is dictated by two factors
(1) the speed of the mechanism under control (as measured by the transducer) and
(2) the resolution of the transducer
The frequency range of this position pulse stream from the transducer can be large and may or may not occur at a periodic rate. In contrast, digital control algorithms must happen at a fixed frequency rate, which means that the CPU of the DSP must operate at a constant rate.
Furthermore, in many digital motor control applications, it is necessary to measure velocity information so that the algorithms residing within the DSP can use the information to compute the required control functions. Hence, a collection technique which allows for the:
(1) asynchronous acquisition of position data,
(2) periodic computation of CPU algorithms, and
(3) conversion of position data to velocity data with minimal drain on CPU resources
is highly desirable.
The invention provides asynchronous digital data acquisition via direct memory access plus periodic sampling of the acquired data for analysis and control output.
This has advantages including a low cost way of attaining velocity information from a position transducer in a DSP motor control application, while meeting the desired criteria of asynchronous acquisition of position data, periodic computation of CPU algorithms, and conversion of position data to velocity data with minimal drain on CPU resources. Since the output of the position transducer is directly connected to the DSP (with DMA), no external hardware is required.